/**
 * 
 */
package com.pengpeng.android.logic.main;

import com.baidu.mapapi.BMapManager;
import com.baidu.mapapi.GeoPoint;
import com.baidu.mapapi.MKSearch;
import com.baidu.mapapi.MapActivity;
import com.baidu.mapapi.MapController;
import com.baidu.mapapi.MapView;

/**
 * @author lilidan
 *
 */
public class BaiduMap implements IMap {

	  BMapManager mBMapMan = null;
	  MKSearch    mMKSearch=null;
	  MapView     mMapView=null;
	  
	  
	public BaiduMap(BMapManager ag0,MapView ag1) {
		// TODO Auto-generated constructor stub
		mBMapMan=ag0;
		mMapView=ag1;
	}

	/* (non-Javadoc)
	 * @see com.pengpeng.android.logic.IMap#InitActivity(com.baidu.mapapi.MapActivity)
	 */

	/* (non-Javadoc)
	 * @see com.pengpeng.android.logic.IMap#setZoom(int)
	 */
	@Override
	public void setZoom(int ag0) {
		// TODO Auto-generated method stub
		MapController mMapController = mMapView.getController(); // 得到mMapView的控制权,可以用它控制和驱动平移和缩放
	   
	    mMapController.setZoom(ag0); //设置地图zoom级别
	}

	/* (non-Javadoc)
	 * @see com.pengpeng.android.logic.IMap#setCenter(int, int)
	 */
	@Override
	public void setCenter(double longitude, double latitude) {
		// TODO Auto-generated method stub
		MapController mMapController = mMapView.getController(); // 得到mMapView的控制权,可以用它控制和驱动平移和缩放
	    GeoPoint point = new GeoPoint((int) (longitude * 1E6),(int) (latitude * 1E6)); //用给定的经纬度构造一个GeoPoint，单位是微度 (度 * 1E6)
	    mMapController.setCenter(point); //设置地图中心点
	    mMapController.setZoom(12); //设置地图zoom级别
	}

	/* (non-Javadoc)
	 * @see com.pengpeng.android.logic.IMap#searchWalkingRoute(int, int, int, int, int)
	 */
	@Override
	public void searchWalkingRoute(double startlongitude, double startlatitude,
			double endlongitude, double endlatitude, int policytype) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.pengpeng.android.logic.IMap#searchDrivingRoute(int, int, int, int, int)
	 */
	@Override
	public void searchDrivingRoute(double startlongitude, double startlatitude,
			double endlongitude, double endlatitude, int policytype) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.pengpeng.android.logic.IMap#searchTransitRoute(int, int, int, int, int)
	 */
	@Override
	public void searchTransitRoute(double startlongitude, double startlatitude,
			double endlongitude, double endlatitude, int policytype) {
		// TODO Auto-generated method stub

	}

}
